import QtQuick
import QtQuick.Controls 2.0

Flickable{
    contentHeight: column.implicitHeight
    Column{
        id: column
        anchors.margins: 6
        spacing: 6

        Text {font.pixelSize: 20; text: "这是20普通文字"}
        Text {font.pixelSize: 24; color: "blue"; text: "这是24颜色文字"}
        Text {font.pixelSize: 24;font.italic: true; text: "这是斜体文字"}
        Text {font.pixelSize: 24;font.underline: true; text: "这是带下划线文字"}
        Text {font.pixelSize: 24;font.strikeout: true; text: "这是带删除线文字，hello world"}
        Text {font.pixelSize: 24;font.wordSpacing: 20; text: "词间距10的文字，hello world"}

        //字重范围1~1000
        Item{height: 30;width: 30}
        Text {font.pixelSize: 24;font.family: "微软雅黑";font.weight: 100; text: "字重1000的文字"}
        Text {font.pixelSize: 24;font.family: "微软雅黑";font.weight: 500; text: "字重500的文字"}
        Text {font.pixelSize: 24;font.family: "微软雅黑";font.weight: 700; text: "字重700的文字"}
        Text {font.pixelSize: 24;font.family: "微软雅黑";font.weight: 1000; text: "字重1000的文字"}


        Item{height: 30;width: 30}
        Text { font.pixelSize: 24; text: "Normal" }
        Text { font.pixelSize: 24; text: "Raised"; style: Text.Raised; styleColor: "#AAAAAA" }
        Text { font.pixelSize: 24; text: "Outline";style: Text.Outline; styleColor: "red" }
        Text { font.pixelSize: 24; text: "Sunken"; style: Text.Sunken; styleColor: "#AAAAAA" }

        Item{height: 30;width: 30}
        Text{
            font.pixelSize: 24
            textFormat: Text.RichText
            text: "log<sub>2</sub><sup>x</sup>"  //上标：sup 下标： sub
        }

        //富文本
        Item{height: 30;width: 30}
        //设置不同的大小无效 不知道原因
        Text {text: "<font color=\"green\" size=\"22\" >提示:</font>\
<font color=\"red\" size=\"12\">Text可设置不同颜色!</font>"}
        Text {font.pixelSize: 24; text: "<b>Hello</b> <i>World!</i>"}
        Text {font.pixelSize: 24; textFormat: Text.RichText; text: "<b>Hello</b> <i>World!</i>"}
        Text {font.pixelSize: 24; textFormat: Text.PlainText; text: "<b>Hello</b> <i>World!</i>"}
        Text {font.pixelSize: 24; textFormat: Text.MarkdownText; text: "**Hello** *World!*" }

        Row {
            Text{
                id: textLeft
                font.pixelSize: 24;
                text: "1"
//                padding: 0
                lineHeight: 0.8
                bottomPadding: -2
            }

            Text{
                anchors.bottom: textLeft.bottom
                font.pixelSize: 14
                text: "/100"
            }
        }
    }
}
